import request from '@/utils/request'

// 获取权限列表
export function permissionsList(data) {
  return request({
    url: '/permissions',
    method: 'GET',
    params: data
  })
}
// 新增权限
export function addpermissionsList(data) {
  return request({
    url: '/permissions',
    method: 'POST',
    data
  })
}
// 权限组简单列表
export function simpleList(data) {
  return request({
    url:'/permissions/simple',
    method: 'GET',
    params: data
  })
}
// 权限组详情
export function detail(id) {
  return request({
    url: `/permissions/${id}`,
    method: 'GET',
  })
}
// 编辑接口
export function update(data) {
  return request({
    url: `/permissions/${data.id}`,
    method: 'PUT',
    data
  })
}
// 掉删除接口
export function delPermission(id) {
  return request({
    url: `/permissions/${id}`,
    method: 'DELETE',
  })
}
